home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10124 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: newshost.lanl.gov!tanmoy
  2. From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Invalid Indirection???
  5. Date: 15 Mar 1996 18:14:42 GMT
  6. Organization: Los Alamos National Laboratory
  7. Message-ID: <TANMOY.96Mar15111443@qcd.lanl.gov>
  8. References: <4i7cck$t67@infa.central.susx.ac.uk> <4iah9k$r02@newshost.cyberramp.net>
  9. NNTP-Posting-Host: qcd.lanl.gov
  10. Mime-Version: 1.0
  11. Content-Type: text
  12. In-reply-to: sinan@cyberramp.net's message of 15 Mar 1996 01:31:31 GMT
  13.  
  14. In article <4iah9k$r02@newshost.cyberramp.net>
  15. sinan@cyberramp.net (John Noland) writes:
  16.  
  17. JN: In article <4i7cck$t67@infa.central.susx.ac.uk>, taux5@central.susx.ac.uk says...
  18. JN: >
  19. JN: > tmp = (tempi[i]*tempj[i])+(tempi[i+1]*tempj[i+1]));
  20. JN: >        
  21. JN: >/* This is where the compiler stops and says there's an invalid
  22. JN: >indirection for the "tmp" assignment */
  23. JN: 
  24. JN: To multiply, you need whitespace. Check the lexical conventions for the
  25.  
  26. Why?
  27.  
  28. JN: evaluation of tokens for your compiler to be certain, but it looks like 
  29. JN: you've confused him.
  30.  
  31. Wasn't the original poster using a C compiler? Big mistake trying to
  32. compile a C program without one :-)
  33.  
  34. Or are you under the misapprehension that a compiler can get confused
  35. by correct and trivial code and still call itself a C compiler? Or
  36. that it can have `lexical conventions for the evaluation of tokens'
  37. whatever that garbage is?
  38.  
  39. JN: Also, your open/closed parentheses don't match in this statement.
  40. JN: 
  41. JN: Your statement should like this (underscores indicate spaces):
  42. JN: 
  43. JN: tmp = ((tempi[i]_*_tempj[i]) + (tempi[i+1]_*_tempj[i+1]))
  44.  
  45. Spaces are often good for reasability, but in this context, they do
  46. not change the meaning of the code.
  47.  
  48. Cheers
  49. Tanmoy
  50. --
  51. tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
  52. Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
  53. Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
  54. <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
  55. internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
  56. fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
  57.